﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TunaInterpreter2.Classes
{
    class Tuna : iBuild
    {

        public bool Start(string code, MainWindow window)
        {
            ScriptData sd = new ScriptData();
            ScriptPreprocesor sc = new ScriptPreprocesor(code, window, sd);

            if (sc.parse())
            {
                window.Print(ConsoleMsgType.INFO, "NO ERRORS");
                return true;
            }

            window.Print(ConsoleMsgType.ERROR, "THERE ARE SOME ERRORS");
            return false;
            //throw new NotImplementedException();
        }
    }
}
